<style>

    .ly-panel {
        background-color: #fff;
        margin-bottom: 10px;
    }

    .ly-panel-border {
        border: 1px solid #E6E6E6;
    }

    .ly-header {
        font-size: 14px;
        padding: 0 10px 10px 10px;
        height: 46px;
        display: flex;
        align-items: center;
    }

    .ly-panel .ly-header {
        height: 56px;
        padding: 0 20px;
    }

    .ly-header .ly-header-title {
        flex: 1;
        font-size: 16px;
    }
    .ly-header .ly-header-title  .description{
        color: #999;
        font-size: 12px;
        font-weight: normal;
        line-height: 20px;
    }

    .ly-header .ly-header-right {
        font-size: 12px;
    }

    .ly-panel .ly-header .ly-header-title {
        font-size: 14px;
    }
    
    .ly-panel-border .ly-header .ly-header-title {
        color: #111;
        font-size: 14px;
        font-weight: bold;
        line-height: 20px;
    }

    .ly-panel-content {
        margin: 0 10px;
        padding-bottom: 15px;
        position: relative;
    }

    .ly-panel .ly-panel-content {
        margin: 0 20px;
    }

    .ly-panel-content p {
        font-size: 13px;
    }

    .ly-panel-content p:first-child {
        margin-top: 0;
    }

    .ly-panel li {
        line-height: 28px;
    }

</style>
<template>
    <div class="ly-panel common-radius" :class="{'ly-panel-border':!noBorder}" :style="{'padding-top':paddingTop+'px'}">
        <slot></slot>
    </div>
</template>
<script>
    Rap.define('', '', function () {
        return {
            name: 'ly-panel',
            props: {
                noBorder: {
                    type: Boolean,
                    'default': false
                }
            },
            data:function () {
                return {
                    paddingTop:0
                }
            },
            mounted: function () {
                if (this.$children.length > 0) {
                    var child = this.$children[0];
                    if (child._isVue && child.$options._componentTag != 'ly-panel-header'&&child.$options._componentTag!='el-tabs') {
                        this.paddingTop=15
                    }
                }
            }, methods: {}
        }
    });
</script>
